/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.restaurant.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author root
 */
@Entity
@Table(name = "modifiremaster")
@XmlRootElement(name = "modifiremaster")
@NamedQueries({
    @NamedQuery(name = "Modifiremaster.findAll", query = "SELECT m FROM Modifiremaster m"),
    @NamedQuery(name = "Modifiremaster.findByModifireID", query = "SELECT m FROM Modifiremaster m WHERE m.modifireID = :modifireID"),
    @NamedQuery(name = "Modifiremaster.findByModifirename", query = "SELECT m FROM Modifiremaster m WHERE m.modifirename = :modifirename"),
    @NamedQuery(name = "Modifiremaster.findByDescription", query = "SELECT m FROM Modifiremaster m WHERE m.description = :description"),
    @NamedQuery(name = "Modifiremaster.findByCostable", query = "SELECT m FROM Modifiremaster m WHERE m.costable = :costable"),
    @NamedQuery(name = "Modifiremaster.findByNoncostable", query = "SELECT m FROM Modifiremaster m WHERE m.noncostable = :noncostable"),
    @NamedQuery(name = "Modifiremaster.findByPrice", query = "SELECT m FROM Modifiremaster m WHERE m.price = :price"),
    @NamedQuery(name = "Modifiremaster.findByIsdeleted", query = "SELECT m FROM Modifiremaster m WHERE m.isdeleted = :isdeleted")})
public class Modifiremaster implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "ModifireID")
    private Long modifireID;
    @Column(name = "modifirename")
    private String modifirename;
    @Column(name = "description")
    private String description;
    @Column(name = "costable")
    private Boolean costable;
    @Column(name = "noncostable")
    private Boolean noncostable;
    @Basic(optional = false)
    @Column(name = "price")
    private double price;
    @Basic(optional = false)
    @Column(name = "isdeleted")
    private boolean isdeleted;
    
    @Transient
    private String alreadyExists;
    
    public String getAlreadyExists() {
		return alreadyExists;
	}

	public void setAlreadyExists(String alreadyExists) {
		this.alreadyExists = alreadyExists;
	}

	public Modifiremaster() {
    }

    public Modifiremaster(Long modifireID) {
        this.modifireID = modifireID;
    }

    public Modifiremaster(Long modifireID, double price, boolean isdeleted) {
        this.modifireID = modifireID;
        this.price = price;
        this.isdeleted = isdeleted;
    }

    public Long getModifireID() {
        return modifireID;
    }

    public void setModifireID(Long modifireID) {
        this.modifireID = modifireID;
    }

    public String getModifirename() {
        return modifirename;
    }

    public void setModifirename(String modifirename) {
        this.modifirename = modifirename;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Boolean getCostable() {
        return costable;
    }

    public void setCostable(Boolean costable) {
        this.costable = costable;
    }

    public Boolean getNoncostable() {
        return noncostable;
    }

    public void setNoncostable(Boolean noncostable) {
        this.noncostable = noncostable;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public boolean getIsdeleted() {
        return isdeleted;
    }

    public void setIsdeleted(boolean isdeleted) {
        this.isdeleted = isdeleted;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (modifireID != null ? modifireID.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Modifiremaster)) {
            return false;
        }
        Modifiremaster other = (Modifiremaster) object;
        if ((this.modifireID == null && other.modifireID != null) || (this.modifireID != null && !this.modifireID.equals(other.modifireID))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.restaurant.domain.Modifiremaster[modifireID=" + modifireID + "]";
    }

}
